package com.ymatou.iapi.ordersync.testcase;

import java.util.List;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.ordersync.parameter.OrderCommandHandleBean;
import com.ymatou.iapi.ordersync.service.OrderCommandHandleCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P2;
import com.ymttest.database.model.YmtOrders;
import com.ymttest.database.mongo.YMatouSellerOrderWapper;
import com.ymttest.database.sqlwapper.YmtOrdersWapper;

/**
 * 同步指令接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_OrderCommandHandle {
	private static OrderCommandHandleBean ordercommandhandleBean;
	private static OrderCommandHandleCall ordercommandhandleCall;
	private static YmtOrders info;
	private static YMatouSellerOrderWapper sellerorderwapper;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("同步指令接口");
		try {
			info = new YmtOrdersWapper().selectLastOrderInfo();
			sellerorderwapper = new YMatouSellerOrderWapper();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Before
	public void caseUp() {
		ordercommandhandleBean = new OrderCommandHandleBean();
		ordercommandhandleCall = new OrderCommandHandleCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(ordercommandhandleCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	/**
	 * 获取mongo status
	 * 
	 * @param iTradingStatus
	 * @param bPaidInFull
	 * @return
	 */
	private int getStatus(int iTradingStatus, int bPaidInFull) {
		int status = 0;
		switch (iTradingStatus) {
		case 1:
			status = 100;
			break;
		case 2:
			status = 200;
			break;
		case 3:
			status = 300;
			break;
		case 4:
			status = 400;
			break;
		case 12:
			status = -120;
			break;
		case 13:
			status = -130;
			break;
		case 16:
			status = 220;
			break;
		case 17:
			if (bPaidInFull == 0)
				status = 210;
			else if (bPaidInFull == 1)
				status = 270;
			break;
		case 18:
			status = -180;
			break;
		default:
			break;
		}
		return status;
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_OrderCommandHandle_000() {
		Logger.start(true,"test");
		try {
			int orderid = 105408384;
			int sellerid = 3383;
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Created");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			ordercommandhandleBean=new OrderCommandHandleBean();
			ordercommandhandleCall=new OrderCommandHandleCall();
			
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Confirmed");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_OrderCommandHandle_001() {
		Logger.start(true,"Created指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Created");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
			//验证时间非空 ？时间需要手工核对一遍
			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
			List<Map<String,Object>> products=(List)result.get("Products");
			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4dz7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
			for (Map<String, Object> map : products) {
				Logger.verifyNotNull(map,"验证Products非空");
				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
			}
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_002() {
		Logger.start(true,"Accepted指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Accepted");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_003() {
		Logger.start(true,"Confirmed指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Confirmed");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_004() {
		Logger.start(true,"Cancelled指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Order");
			ordercommandhandleBean.setCommand("Cancelled");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_005() {
		Logger.start(true,"Paid指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Payment");
			ordercommandhandleBean.setCommand("Paid");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_006() {
		Logger.start(true,"PostPayApplied指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Payment");
			ordercommandhandleBean.setCommand("PostPayApplied");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_007() {
		Logger.start(true,"PostPaid指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Payment");
			ordercommandhandleBean.setCommand("PostPaid");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_008() {
		Logger.start(true,"PostPayCancelled指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Payment");
			ordercommandhandleBean.setCommand("PostPayCancelled");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_009() {
		Logger.start(true,"PostPayNotRequired指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Payment");
			ordercommandhandleBean.setCommand("PostPayNotRequired");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_010() {
		Logger.start(true,"Auditing指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("RiskControl");
			ordercommandhandleBean.setCommand("Auditing");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_011() {
		Logger.start(true,"Passed指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("RiskControl");
			ordercommandhandleBean.setCommand("Passed");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_012() {
		Logger.start(true,"Rejected指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("RiskControl");
			ordercommandhandleBean.setCommand("Rejected");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_013() {
		Logger.start(true,"Started指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Delivery");
			ordercommandhandleBean.setCommand("Started");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_014() {
		Logger.start(true,"DomesticDelivered指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("Delivery");
			ordercommandhandleBean.setCommand("DomesticDelivered");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			//TODO 验证DomesticDelivered
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_015() {
		Logger.start(true,"Complaint指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("CustomerService");
			ordercommandhandleBean.setCommand("Complaint");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			//TODO 投诉维权 Complaint
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_OrderCommandHandle_016() {
		Logger.start(true,"Refund指令调用成功,验证数据");
		try {
			int orderid = info.getIorderid();
			int sellerid = info.getIbuyerid();
			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
			sellerorderwapper.saveOrderInfoById(orderid, sellerid);
			ordercommandhandleBean.setType("CustomerService");
			ordercommandhandleBean.setCommand("Refund");
			ordercommandhandleBean.setOrderId(orderid);
			ordercommandhandleCall.setData(ordercommandhandleBean);
			ordercommandhandleCall.callService();
			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
			Logger.comment("OrderInfo:"+result.toString());
			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
			//TODO Refund
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_017() {
//		Logger.start(true,"mongo缺少数据时Accepted指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Order");
//			ordercommandhandleBean.setCommand("Accepted");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_018() {
//		Logger.start(true,"mongo缺少数据时Confirmed指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Order");
//			ordercommandhandleBean.setCommand("Confirmed");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_019() {
//		Logger.start(true,"mongo缺少数据时Cancelled指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Order");
//			ordercommandhandleBean.setCommand("Cancelled");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_020() {
//		Logger.start(true,"mongo缺少数据时Paid指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Payment");
//			ordercommandhandleBean.setCommand("Paid");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_021() {
//		Logger.start(true,"mongo缺少数据时PostPayApplied指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Payment");
//			ordercommandhandleBean.setCommand("PostPayApplied");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_022() {
//		Logger.start(true,"mongo缺少数据时PostPaid指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Payment");
//			ordercommandhandleBean.setCommand("PostPaid");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_023() {
//		Logger.start(true,"mongo缺少数据时PostPayCancelled指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Payment");
//			ordercommandhandleBean.setCommand("PostPayCancelled");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_024() {
//		Logger.start(true,"mongo缺少数据时PostPayNotRequired指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Payment");
//			ordercommandhandleBean.setCommand("PostPayNotRequired");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_025() {
//		Logger.start(true,"mongo缺少数据时Auditing指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("RiskControl");
//			ordercommandhandleBean.setCommand("Auditing");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_026() {
//		Logger.start(true,"mongo缺少数据时Passed指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("RiskControl");
//			ordercommandhandleBean.setCommand("Passed");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_027() {
//		Logger.start(true,"mongo缺少数据时Rejected指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("RiskControl");
//			ordercommandhandleBean.setCommand("Rejected");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_028() {
//		Logger.start(true,"mongo缺少数据时Started指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Delivery");
//			ordercommandhandleBean.setCommand("Started");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_029() {
//		Logger.start(true,"mongo缺少数据时DomesticDelivered指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("Delivery");
//			ordercommandhandleBean.setCommand("DomesticDelivered");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//			//TODO 验证DomesticDelivered
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_030() {
//		Logger.start(true,"mongo缺少数据时Complaint指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("CustomerService");
//			ordercommandhandleBean.setCommand("Complaint");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//			//TODO 投诉维权 Complaint
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//
//	@Test
//	@Category(P2.class)
//	@TestCase
//	public void Tc_OrderCommandHandle_031() {
//		Logger.start(true,"mongo缺少数据时Refund指令调用成功,验证数据");
//		try {
//			int orderid = info.getIorderid();
//			int sellerid = info.getIbuyerid();
//			sellerorderwapper.deleteOrderInfoById(orderid, sellerid);
//			
//			ordercommandhandleBean.setType("CustomerService");
//			ordercommandhandleBean.setCommand("Refund");
//			ordercommandhandleBean.setOrderId(orderid);
//			ordercommandhandleCall.setData(ordercommandhandleBean);
//			ordercommandhandleCall.callService();
//			Logger.comment("ordercommandhandleCall send:" + ordercommandhandleCall.getEntityString());
//			Logger.comment("ordercommandhandleCall response:" + ordercommandhandleCall.getReturnData());
//			Logger.verifyIsContains("ok", ordercommandhandleCall.getReturnData(), "验证返回结果");
//			Map result = sellerorderwapper.selectOrderInfoById(orderid, sellerid);
//			Logger.comment("OrderInfo:"+result.toString());
//			Logger.verifyEquals(orderid, (Integer) result.get("_id"), "验证OrderId");
//			Logger.verifyEquals(sellerid, (Integer) result.get("Seller"), "验证Seller");
//			Logger.verifyEquals(info.getIuserid(), (Integer) result.get("Buyer"), "验证Buyer");
//			Logger.verifyEquals(info.getItradingstatus(), (Integer) result.get("TradingStatus"), "验证TradingStatus");
//			Logger.verifyEquals(info.getBshangouorder()?1:0, (Integer) result.get("Type"), "验证Type");
//			Logger.verifyEquals(info.getBpaidinfull()?1:0, (Integer) result.get("FullPaid"), "验证FullPaid");
//			int status=getStatus(info.getItradingstatus(), info.getBpaidinfull()?1:0);
//			Logger.verifyEquals(status,(Integer)result.get("Status"), "验证Status");
//			Logger.verifyEquals(info.getIriskverifiedstatus(), (Integer) result.get("Risk"), "验证Risk");
//			//验证时间非空 ？时间需要手工核对一遍
//			Logger.verifyNotNull(result.get("PaidT").toString(), "PaidT");
//			Logger.verifyNotNull(result.get("AddT").toString(), "AddT");
//			Logger.verifyNotNull(result.get("PPaidT").toString(), "PPaidT");
//			Logger.verifyNotNull(result.get("AcceptT").toString(), "AcceptT");
//			Logger.verifyNotNull(result.get("DeliverT").toString(), "DeliverT");
//			Logger.verifyNotNull(result.get("ApplyPPayT").toString(), "ApplyPPayT");
//			List<Map<String,Object>> products=(List)result.get("Products");
//			//TODO Products=[ { "Logistics" : 5 , "PrdId" : "d1298ca4-c525-4d7b-bed0-80734c2e7d3e"}] 暂未校验 交易这已经验证
//			for (Map<String, Object> map : products) {
//				Logger.verifyNotNull(map,"验证Products非空");
//				Logger.verifyNotNull(map.get("Logistics"),"验证Logistics非空");
//				Logger.verifyNotNull(map.get("PrdId").toString(),"验证PrdId非空");
//			}
//			//TODO Refund
//		} catch (Exception e) {
//			Logger.fail(e);
//		}
//	}
//	
	
}